﻿namespace Ycg.Core
{
    public class LinkNode
    {
        private object _data;
        private LinkNode _nextNode;

        public LinkNode(object data)
        {
            this._data = data;
        }

        public LinkNode(object data, LinkNode node)
        {
            this._data = data;
            this._nextNode = node;
        }

        public object Data
        {
            get { return this._data; }
        }

        public LinkNode NextNode
        {
            get { return this._nextNode; }
            set { this._nextNode = value; }
        }
    }

    public class LinkNode<T>
    {
        private T _data;
        private LinkNode<T> _nextNode;

        public LinkNode(T data)
        {
            this._data = data;
        }

        public LinkNode(T data, LinkNode<T> node)
        {
            this._data = data;
            this._nextNode = node;
        }

        public T Data
        {
            get { return this._data; }
        }

        public LinkNode<T> NextNode
        {
            get { return this._nextNode; }
            set { this._nextNode = value; }
        }
    }
}